<!--
 * @Date: 2022-03-30 15:59:30
 * @LastEditors: wuyuxin
 * @LastEditTime: 2022-03-30 16:07:01
 * @FilePath: \Vue3-code\06_other_components\src\02_jsx的使用\App.vue
 * @description: 文件描述
-->
<script>
  import HelloWorld from './HelloWorld.vue';

  export default {
    data() {
      return {
        counter: 0
      }
    },

    render() {
      const increment = () => this.counter++;
      const decrement = () => this.counter--;

      return (
        <div>
          <h2>当前计数: {this.counter}</h2>
          <button onClick={increment}>+1</button>
          <button onClick={decrement}>-1</button>
          <HelloWorld>
          </HelloWorld>
        </div>
      )
    }
  }
</script>

<style lang="scss" scoped>

</style>